import { createRouter, createWebHashHistory } from 'vue-router';



const routes = [
    {
        path: "/",
        redirect: "/index"
    },
    {
        path: "/index",
        component: () => import('@/pages/index.vue'),
        meta: { title: "index", auth: false }
    },
    {
        path: "/set",
        component: () => import('@/pages/set.vue'),
        meta: { title: "index", auth: false }
    },
    {
        path: "/:id(.*)*",
        component: () => import('@/pages/404.vue'),
        meta: { title: "404页面" },
    }
]



//创建路由对象
const router = createRouter({
    history: createWebHashHistory('/'),
    routes
})



//导出路由对象，以供其它组件使用
export default router





